package com.westvalley.ctrl;

import com.jfinal.aop.Enhancer;
import com.jfinal.core.Controller;
import com.jfinal.ext.annotation.ControllerBind;
import com.westvalley.syn.service.NcBillTypeService;
import com.westvalley.syn.service.NcClientService;
import com.westvalley.syn.service.NcCompanyService;
import com.westvalley.syn.service.NcDeptService;
import com.westvalley.syn.service.NcIncomeService;
import com.westvalley.syn.service.NcPsnDocService;
import com.westvalley.syn.service.SynService;

@ControllerBind(route="SynNcCtrl")
public class SynNcCtrl extends Controller{
	public void index(){
		renderJsp("/westvalley/synNcData/synData.jsp");
	}
	
	/**
	 * NC公司
	 */
	public void synNcCompany(){
		SynService service = Enhancer.enhance(NcCompanyService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * NC部门
	 */
	public void synNcDept(){
		SynService service = Enhancer.enhance(NcDeptService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * NC人员
	 */
	public void synNcPsn(){
		SynService service = Enhancer.enhance(NcPsnDocService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * NC客商
	 */
	public void synNcClient(){
		SynService service = Enhancer.enhance(NcClientService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * NC收支项目
	 */
	public void synNcIncome(){
		SynService service = Enhancer.enhance(NcIncomeService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * NC交易类型
	 */
	public void synNcBillType(){
		SynService service = Enhancer.enhance(NcBillTypeService.class);
		renderJson(service.executeSynData());
	}
}
